﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ModuloMetas.aspx.vb" Inherits="Sistema_ModuloMetas" MasterPageFile="~/Library/Site.master" %>


<%@ Register Src="../CustomControls/Municipio.ascx" TagName="Municipio" TagPrefix="uc1" %>
<%@ Register src="../CustomControls/EncabezadoDatosHogar.ascx" tagname="EncabezadoModulo" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <style type="text/css">
        .style15
        {
            height: 20px;
        }
        </style>
    <script>
        function mostrarmensaje(Titulo, mensaje, tipomensaje) {
            showDialog(Titulo, mensaje, tipomensaje)
        }
      
                         </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:HiddenField ID="hdIdvisita" runat="server" Value="0" />
    <asp:HiddenField ID="hdIdPersona" runat="server" Value="0" />
    <asp:HiddenField ID="hdIdhogar" runat="server" Value="0" />



    



    <uc2:EncabezadoModulo ID="EncabezadoModulo1" runat="server" />
    <br />



    



    <br />
    <div align="left">
        <table border="1" width="100%">
            <tr>
                <td class="style15">
                    <center>
                        <h1>
                            MODULO PSICOSOCIAL PLAN DE VIDA</h1>
                    </center>
                </td>
            </tr>
            <thead>
                <tr>
                    <th>
                        &nbsp;<div id="contentmsg" runat="server">
                      </div>




                            <br />
                            <br />
                        
                    </th>
                </tr>
            </thead>
            
        </table>
        <table border="1">
                       <tr><td colspan="3"><div class="error"><asp:Label runat="server" ID="lblinformacion"></asp:Label> </div></td></tr>

            <tr>
                <td>
                    23.  La familia Identifica y define detalladamente su plan de vida </td>
                <td>
                        <asp:RadioButtonList ID="rbidentificayDefinePlanVida" runat="server" RepeatDirection="Horizontal">
                        </asp:RadioButtonList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" 
                            ControlToValidate="rbidentificayDefinePlanVida" CssClass="error" Display="Dynamic"  
                            ErrorMessage="Obligatorio"></asp:RequiredFieldValidator>
                        </td>
                        <td><asp:TextBox ID="txtidentificayDefinePlanVida" runat="server" Height="38px" TextMode="MultiLine" 
                                Width="468px"></asp:TextBox>
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="La observación debe dar respuesta a por que seleccionó sí o no"
                        class="error" ControlToValidate="txtidentificayDefinePlanVida" Display="Dynamic"></asp:RequiredFieldValidator>

                                </td>
                </tr>
                <tr>
                <td colspan="4">
                   Metas
                   </td>
                </tr>
                <tr>

                <td colspan="4">
                  <h2>Metas a corto plazo</h2>
                    
                                                           &nbsp;<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames = "idMeta">
                        <Columns>
                        <asp:BoundField DataField = "idMeta" HeaderText="idMeta" Visible="false"   />
                        <asp:BoundField DataField = "txtMeta" HeaderText="Meta" ControlStyle-Width="200px" ItemStyle-Width="300px"  />
                        <asp:BoundField DataField = "prioridad" HeaderText="prioridad"  />
                            <asp:TemplateField HeaderText="Prioridad">
                                <ItemTemplate>
                                    

                                             <asp:RadioButtonList ID="RadioButtonList1" runat="server" ToolTip='<%# eval("idmeta") %>'  
                                        RepeatDirection="Horizontal" AutoPostBack = "True"  
                                        
                                        SelectedValue='<%# eval("idprioridad") %>' 
                                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" >
                                        <asp:ListItem Value="3">Alta</asp:ListItem>
                                        <asp:ListItem Value="2">Media</asp:ListItem>
                                        <asp:ListItem Value="1">Baja</asp:ListItem>
                                        <asp:ListItem Value="4">Meta Cumplida</asp:ListItem>
                                        <asp:ListItem Value="0" style="display:none" >sin asignar</asp:ListItem>
                                    </asp:RadioButtonList>  
                                    <asp:CompareValidator ID="CompareValidator1" ControlTovalidate="RadioButtonList1"  runat="server"  Display="Dynamic" 
                                    ErrorMessage="Seleccione una prioridad" Type="Integer" ValueToCompare="0" Class="error" Operator="GreaterThan"></asp:CompareValidator>
                                                                     
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Eliminar">
                                <ItemTemplate>
                                    <asp:ImageButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="borrar" onclientclick="return confirm('¿Desea eliminar la Meta?');" CommandArgument='<%# eval("idmeta") %>' ImageUrl="../Imagenes/delete2.gif"></asp:imageButton>
                                </ItemTemplate>
                            </asp:TemplateField>

                        </Columns>
                        </asp:GridView>
                                            Adicionar meta a corto plazo:<br />
                                            <asp:TextBox ID="txtMetaCortoPlazo" runat="server" TextMode="MultiLine" 
                                                Width="395px" ValidationGroup="MetaCP"></asp:TextBox>
                                            <br />
                                            <asp:RequiredFieldValidator ControlToValidate="txtMetaCortoPlazo" ValidationGroup="MetaCP"  ID="RequiredFieldValidator19" runat="server" 
                                                ErrorMessage="Obligatorio" class="error" Display="Dynamic"   ></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Button ID="btnAgregarMetaCortoPlazo" runat="server" CssClass="boton" 
                                                Text="Agrear meta" ValidationGroup="MetaCP" />
                    </ContentTemplate>
                                    </asp:UpdatePanel>
                     
                    

                 
                  <h2>Metas a mediano plazo</h2>
                  
                                                           &nbsp;<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                        <ContentTemplate>
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames = "idMeta">
                        <Columns>
                        <asp:BoundField DataField = "idMeta" HeaderText="idMeta" Visible="false" />
                        <asp:BoundField DataField = "txtMeta" HeaderText="Meta" ControlStyle-Width="200px" ItemStyle-Width="300px"  />
                        <asp:BoundField DataField = "prioridad" HeaderText="prioridad"  />
                            <asp:TemplateField HeaderText="Prioridad">
                                <ItemTemplate>
                                    

                                             <asp:RadioButtonList ID="RadioButtonList1" runat="server" ToolTip='<%# eval("idmeta") %>'     
                                        RepeatDirection="Horizontal" AutoPostBack = "True"  
                                        
                                        SelectedValue='<%# eval("idprioridad") %>' 
                                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" >
                                        <asp:ListItem Value="3">Alta</asp:ListItem>
                                        <asp:ListItem Value="2">Media</asp:ListItem>
                                        <asp:ListItem Value="1">Baja</asp:ListItem>
                                        <asp:ListItem Value="4">Meta Cumplida</asp:ListItem>
                                        <asp:ListItem Value="0" style="display:none" >sin asignar</asp:ListItem>
                                    </asp:RadioButtonList>  
                                    <asp:CompareValidator ID="CompareValidator1" ControlTovalidate="RadioButtonList1"  runat="server"  Display="Dynamic"
                                    ErrorMessage="Seleccione una prioridad" Type="Integer" ValueToCompare="0" Class="error"  Operator="GreaterThan"></asp:CompareValidator>
                                                                     
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Eliminar">
                                <ItemTemplate>
                                    <asp:ImageButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="borrar" onclientclick="return confirm('¿Desea eliminar la Meta?');" CommandArgument='<%# eval("idmeta") %>' ImageUrl="../Imagenes/delete2.gif"></asp:imageButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        </asp:GridView>
                     Adicionar meta a mediano plazo:<br />
                                            <asp:TextBox ID="txtMetaMedianoPlazo" runat="server" TextMode="MultiLine" 
                                                Width="395px" ValidationGroup="MetaMP"></asp:TextBox>
                                            <br />
                                            <asp:RequiredFieldValidator ControlToValidate="txtMetaMedianoPlazo" ValidationGroup="MetaMP"  ID="RequiredFieldValidator1" runat="server" 
                                                ErrorMessage="Obligatorio" class="error" Display="Dynamic"   ></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Button ID="btnAgregarMetaMedianoPlazo" runat="server" CssClass="boton" 
                                                Text="Agrear meta" ValidationGroup="MetaMP" />
                    
                    </ContentTemplate>
                                    </asp:UpdatePanel>
                     

                  <h2>Metas a largo plazo</h2>

                  
                                                           &nbsp;<asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                        <ContentTemplate>
                        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataKeyNames = "idMeta">
                        <Columns>
                        <asp:BoundField DataField = "idMeta" HeaderText="idMeta" Visible="false"  />
                        <asp:BoundField DataField = "txtMeta" HeaderText="Meta" ControlStyle-Width="200px" ItemStyle-Width="300px"  />
                        <asp:BoundField DataField = "prioridad" HeaderText="prioridad"  />
                            <asp:TemplateField HeaderText="Prioridad">
                                <ItemTemplate>
                                    

                                             <asp:RadioButtonList ID="RadioButtonList1" runat="server" ToolTip='<%# eval("idmeta") %>'   
                                        RepeatDirection="Horizontal" AutoPostBack = "True"  
                                        
                                        SelectedValue='<%# eval("idprioridad") %>' 
                                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" >
                                        <asp:ListItem Value="3">Alta</asp:ListItem>
                                        <asp:ListItem Value="2">Media</asp:ListItem>
                                        <asp:ListItem Value="1">Baja</asp:ListItem>
                                        <asp:ListItem Value="4">Meta Cumplida</asp:ListItem>
                                        <asp:ListItem Value="0" style="display:none" >sin asignar</asp:ListItem>
                                    </asp:RadioButtonList>  
                                    <asp:CompareValidator ID="CompareValidator1" ControlTovalidate="RadioButtonList1"  runat="server"  Display="Dynamic"
                                    ErrorMessage="Seleccione una prioridad" Type="Integer" ValueToCompare="0" Class="error" Operator="GreaterThan"></asp:CompareValidator>
                                                                     
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField = "txtMeta" HeaderText="Meta" ControlStyle-Width="200px" ItemStyle-Width="300px"  />
                            <asp:TemplateField HeaderText="Eliminar">
                                <ItemTemplate>
                                    <asp:ImageButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="borrar" onclientclick="return confirm('¿Desea eliminar la Meta?');" CommandArgument='<%# eval("idmeta") %>' ImageUrl="../Imagenes/delete2.gif"></asp:imageButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        </asp:GridView>
                    
                    Adicionar meta a largo plazo:<br />
                    <asp:TextBox ID="txtMetaLargoPlazo" runat="server" TextMode="MultiLine" 
                                                Width="395px" ValidationGroup="MetaLP"></asp:TextBox>
                                            <br />
                                            <asp:RequiredFieldValidator ControlToValidate="txtMetaLargoPlazo" ValidationGroup="MetaLP"  ID="RequiredFieldValidator2" runat="server" 
                                                ErrorMessage="Obligatorio" class="error" Display="Dynamic"   ></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Button ID="btnAgregarMetaLargoPlazo" runat="server" CssClass="boton" 
                                                Text="Agrear meta" ValidationGroup="MetaLP" />
                    </ContentTemplate>
                                    </asp:UpdatePanel>
                     


                   </td>
                
            </tr>
            <tr>
                <td colspan="4">
                        <asp:CustomValidator ID="CustomValidator1" runat="server" class="error" Display="Dynamic"
                            ErrorMessage="CustomValidator"></asp:CustomValidator>
                    </td>
            </tr>
            <tr>
                <td colspan="4">
                        <asp:Button ID="btnGuardar" runat="server" CssClass="boton" 
                        Text="Guardar" />
                        <asp:Button ID="btnCancelar" runat="server" CausesValidation="false" CssClass="boton"
                            Text="Cancelar" />
                    </td>
            </tr>
        </table>
</asp:Content>


